<?php $this->_extends('../_layouts/blank_layout'); ?>

<?php $this->_block('contents'); ?>

<div class="tasks">
<?php
// role_id rolename description user_owned group_owned
?>
  <h1><?php echo $show_box['title'];?></h1>
<table cellSpacing="0" cellPadding="3" align="center" border="0" width="100%">
    <tr>
        <td align="center" class='bgTitle'>ID</td>
        <td align="center" class='bgTitle'>角色名</td>
        <td align="center" class='bgTitle'>角色说明</td>
        <td align="center" class='bgTitle'>成员数</td>
        <td align="center" class='bgTitle'>用户组数</td>
        <td align="center" class='bgTitle'>操作</td>
    </tr>
  <?php foreach ($show_box['roles'] as $value): ?>
    <tr>
        <td align="center"><?php echo h($value->role_id); ?></td>
        <td align="left"><span title="角色说明：<?php echo h($value->description); ?>"><?php echo h($value->rolename); ?></span></td>
        <td align="left"><?php echo h($value->description); ?></td>
        <td align="center"><?php echo h($value->user_owned); ?></td>
        <td align="center"><?php echo h($value->group_owned); ?></td>
        <td align="center">
            <a href="<?php echo url('admin::roles/view', array('role_id' => $value->id())); ?>">详情</a>
            <a href="<?php echo url('admin::roles/edit', array('role_id' => $value->id())); ?>">修改</a>
            <a href="<?php echo url('admin::roles/del', array('role_id' => $value->id())); ?>" onclick="return confirm('您确定要删除角色【 <?php echo h($value->rolename); ?> 】吗?');">删除</a>
            <a href="<?php echo url('admin::roles/bind', array('role_id' => $value->id())); ?>">绑定权限</a>
            </td>
    </tr>
  <?php endforeach; ?>

</table>
  <?php /*分页部分*/ $this->_control('pagination', 'my-pagination', array('pagination' => $show_box['pagination'])); ?>

</div>


<?php $this->_endblock(); ?>



